package ngat.oss.scheduling.auctions;

/** Event class for submitting a bid.*/
public class BidEvent extends AuctionEvent {

    /** The specification of the bid.
     * ### Temporarily set to be an amount represented by a Double.
     */
    private Object bid;

    /** The ID of the delegate (bidder).*/
    private String delegateId;

    /** */
    public BidEvent(long timeStamp, int auctionId, String delegateId, Object bid) {
	super(timeStamp, auctionId);
	this.delegateId = delegateId;
	this.bid = bid;
    }

    /** Returns the specification of the bid.*/
    public Object getBid() { return bid; }

    /** Returns the  ID of the delegate (bidder).*/
    public String getDelegateId() { return delegateId; }

    /** Returns a readable representation of this AuctionEvent.*/
    public String toString() { 
	return super.toString()+":[Bid, Delegate:"+delegateId+", Bid:"+bid+"]";
	
	// e.g. AuctionEvent@1102293933:AX67B:[Bid, Delegate:JL04A01, Bid:[CashBid: Amount:50.0, PenaltyFactor:2.0/hour] ] etc
    }
}
